//
//  LongPeizhi.m
//  CarTown
//
//  Created by xionghao on 15/9/12.
//  Copyright (c) 2015年 熊浩. All rights reserved.
//

#import "LongPeizhi.h"

@implementation LongPeizhi

-(void)setLoogdetail:(NSString *)loogdetail{
    _loogdetail=loogdetail;
    [self setheight];
}

-(void)setheight{
    CGFloat textwith= XHScreenwidth-109;
    NSDictionary *attribute = @{NSFontAttributeName: [UIFont systemFontOfSize:15]};
    
    CGSize labelSize = [_loogdetail boundingRectWithSize:CGSizeMake(textwith, 0) options: NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:attribute context:nil].size;
    if (labelSize.height+24>44) {
        self.rowheight=labelSize.height+24;
    }else{
        self.rowheight=44;
    }
    
}
@end
